/**
 * 
 */
package com.roc.util.constant;

import org.apache.commons.lang3.StringUtils;

/**
 * @author dxpeng 2013-8-8 下午6:32:41
 */
public enum AuditingResultCodeType {
	 
	 PASS("同意", "01"),
	 REFUSE("驳回", "02"),
	 SOME_PASS("批量审核通过", "05"),
	 FULL_FILL_MATERIALS("补齐材料", "03"),	 
	 INCOMPLETE_INFO("终止", "04"),
	 FREEZEAPPLY("申请冻结", "Q"),	
	 REVIEWFREEZEPASS("同意冻结", "Y"),
	 REVIEWFREEZEREFUSE("不同意冻结", "N"),
	 UNFREEZEAPPLY("申请解冻", "U"),
	 REVIEWUNFREEZEPASS("同意解冻", "N"),
	 REVIEWSETTING("结算审核", "W"),
	 DIAODANAPPLY("调单申请", "1"),
	 DIAODANWANSHAN("调单完善", "2"),
	 DIAODANPASS("调单审批通过", "3"),
	 DIAODANREFUSE("调单审批不通过", "1"),
	 REVIEWUNFREEZEREFUSE("不同意解冻", "Y"),
	 A0("正常","A0"),
	 A1("提示级","A1"),
	 A2("关注级","A2"),
	 A3("预警级","A3"), 
	 A4("拒绝级","A4"),
	 AUTH_LIMIT("限制","03");
	 
	
	 
	private String code;
	private String name;
	private boolean editAble;
	private boolean enabled;

	private AuditingResultCodeType( String name,String code) {
		this.code = code;
		this.name = name;
		
	}

	public boolean isEditAble() {
		return editAble;
	}

	public boolean isEnabled() {
		return enabled;
	}

	public String getCode() {
		return code;
	}

	public String getName() {
		return name;
	}

	public static AuditingResultCodeType valueOfCode(String code) {
		if (StringUtils.isBlank(code)) {
			throw new IllegalArgumentException("SysLogType code " + code
					+ " is blank");
		}
		for (AuditingResultCodeType ms : values()) {
			if (ms.getCode().equals(code)) {
				return ms;
			}
		}
		throw new IllegalArgumentException("SysLogType code " + code
				+ " is not exist");
	}

}
